package a.b.service.impl;

import a.b.mapper.BookMapper;
import a.b.pojo.Book;
import a.b.service.IBookService;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

@Service
public class BookServiceImpl extends ServiceImpl<BookMapper, Book> implements IBookService {

    @Autowired
    private BookMapper bookMapper;

    @Override
    public IPage<Book> getPage(Integer yemashu, Integer tiaoshu) {
        //设置分页条件
        IPage page = new Page(yemashu,tiaoshu);

       return bookMapper.selectPage(page,null);
    }
}
